The present invention relates to resource allocation in networking multiplexers and, in particular, to a method and system for selective flow control of network media connected to a network multiplexer in order to prevent unfair resource allocation or resource blocking within a network multiplexer.
Bridges, switches, and routers are types of network multiplexers that receive communications packets, also called messages, from network media, such as ethernets, and forward the received communications packets to one or more network media. Network multiplexers serve to link physically separate network media into a single network. A network multiplexer contains a number of ports through which separate physical network media are coupled to the network multiplexer. Each port is associated with a receive queue that contains message descriptors pointing to memory locations in which received communications packets are stored, and are associated with transmit queues containing message descriptors that point to communications packets stored in memory for transmission by the port. A network multiplexer forwards received communications packets by moving message descriptors from receive queues to transmit queues.
The receive queues, transmit queues, and memory for storing communications packets within a network multiplexer represent finite internal resources of the network multiplexer. Mismatches between the rates at which communications packets are received by a network multiplexer and the rates at which received communications packets may be transmitted by a network multiplexer can result in the exhaustion of certain internal resources of the network multiplexer, such as backup of receive and transmit queues, exhaustion of memory capacity within the network multiplexer, and, ultimately, discarded communications packets. When communications packets are discarded by the network multiplexer, or dropped, without being transmitted to their intended destinations, the loss of the communications packet is generally detected by the network node that originally transmitted the communications packet after a period of time and is then sent again by the network node that originally transmitted the communications packet. Retransmission of dropped communications packets introduces significant delays and possibilities for further problems and error conditions to arise. When certain network-multiplexer internal resources are exhausted, messages received via certain ports may be blocked from being forwarded to other ports while resources are monopolized by other ports. Such problems can be avoided by individually gating reception of communications packets via ports using network-hardware or network-protocol level flow control techniques. However, currently-available methods require complex and costly logic in order to monitor the use of portions of resources allocated to each port. Thus, designers, architects, and manufacturers of network multiplexers recognize the need for a simple method and system to selectively flow control the network media coupled to a network multiplexer in order to prevent communications packets from being discarded as a result of the exhaustion of internal network multiplexer resources.
The present invention provides a method and system for selectively applying flow control to network media coupled to a network multiplexer in order to prevent monopolization of resources and blocking of communications packet transfer between ports within the network multiplexer. High and low thresholds are assigned to each transmit queue within the network multiplexer. In addition, each port in the network multiplexer is associated with a list of ports from which the port has received a flow control directive. If the number of queued message descriptors in a transmit queue exceeds the high threshold, any port thereafter attempting to queue additional message descriptors to the transmit queue are directed by the port associated with the transmit queue to undertake flow control on their associated network media in order to temporarily prevent reception of additional communications packets. Once the number of message descriptors queued to the transmit queue falls below the low threshold, all ports to which the port associated with the transmit queue has sent flow control directives are sent release flow control messages so that these ports can discontinue flow control and resume receiving communications packets. A flow controlled port remains flow controlled until all outstanding flow control directives have been removed by subsequent release flow control messages. By the method of the present invention, internal multiplexer conditions under which communications packets need to be dropped are prevented from occurring.